<template>
  <div class="centerRight2">
    <div class="bg-color-black">
      <div class="d-flex pt-2 pl-2">
        <span>
          <i class="iconfont icon-vector" />
        </span>
        <div class="d-flex">
          <span class="fs-xl text mx-2">任务完成排行榜</span>
        </div>
      </div>
      <div class="d-flex mt-1 jc-center body-box">
        <dv-scroll-board class="dv-scr-board" :config="config" />
      </div>
    </div>
  </div>
</template>

<script>
import { defineComponent, reactive } from 'vue'
export default defineComponent({
  setup() {
    const config = reactive({
      header: ['模块', '分支', '覆盖率'], // 可按需保留原"组件"表头，此处优化为更贴合业务的"模块名称"
      data: [
        ['用户中心', 'dev-6', "<span class='colorGrass'>↑89%</span>"],
        ['订单管理', 'rea-4', "<span class='colorRed'>↓29%</span>"],
        ['商品库存', 'fix-3', "<span class='colorGrass'>↑96%</span>"],
        ['支付结算', 'dev-8', "<span class='colorGrass'>↑73%</span>"],
        ['营销活动', 'rea-6', "<span class='colorRed'>↓38%</span>"],
        ['日志监控', 'fix-5', "<span class='colorGrass'>↑67%</span>"],
        ['权限认证', 'dev-3', "<span class='colorGrass'>↑82%</span>"],
        ['消息推送', 'fix-8', "<span class='colorRed'>↓43%</span>"],
        ['搜索推荐', 'dev-10', "<span class='colorRed'>↓18%</span>"],
        ['数据分析', 'rea-2', "<span class='colorGrass'>↑91%</span>"]
      ],
      rowNum: 7,
      headerHeight: 35,
      headerBGC: '#0f1325',
      oddRowBGC: '#0f1325',
      evenRowBGC: '#171c33',
      index: true,
      columnWidth: [50],
      align: ['center']
    })
    return { config }
  }
})
</script>

<style lang="scss" scoped>
$box-height: 410px;
$box-width: 300px;
.centerRight2 {
  padding: 16px;
  padding-top: 20px;
  height: $box-height;
  width: $box-width;
  border-radius: 5px;
  .bg-color-black {
    height: $box-height - 30px;
    border-radius: 10px;
  }
  .text {
    color: #c3cbde;
  }
  .body-box {
    border-radius: 10px;
    overflow: hidden;
    .dv-scr-board {
      width: 270px;
      height: 340px;
    }
  }
}
</style>
